<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS3——进度动画</title>
    <style>
        .content{
            width:100px;
            height:100px;
            margin:50px;
            background:url('images/star.png') no-repeat;
            background-size: cover;
        }

        /* 定义进度动画 */
        @keyframes animate1{
            100%{
                /* 变形 */
                transform:translate(20%,-20%);
            }
        }

        /* 通过active触发过度动画 */
        .content:hover{
            animation: animate1 0.3s linear 0s 1 normal forwards;
        }
    </style>
</head>
<body>
    <div class="content"></div>
</body>
</html>